package com.ling.sbbyyds.entity.community;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


@Data
//表名
@Table(name = "sbb_community_posts")
@ApiModel(description = "社区帖子")
@Accessors(chain = true)
@ToString
@EqualsAndHashCode
public class CommunityPosts {

    @Id
    @ApiModelProperty("社区帖子id")
    private Long postsId;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("帖子标题")
    private String title;

    @ApiModelProperty("帖子内容")
    private String content;

    @ApiModelProperty("话题类型id（对应分类）")
    private Long talkTypeId;

    @ApiModelProperty("话题id")
    private Long talkId;

    @ApiModelProperty("浏览数")
    private Integer viewNum;

    @ApiModelProperty("发布时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date releaseTime;

    @ApiModelProperty("是否删除 0.正常  1.已经删除")
    @TableLogic
    private Integer isDel;

    @ApiModelProperty("帖子状态  0.正常  1.违规")
    private Integer state;

    @ApiModelProperty("帖子权限  0.公开  1.仅自己可见")
    private Integer isPrivate;

    @ApiModelProperty("图片列表")
    private String imageList;

    @ApiModelProperty("ip归属地")
    private String ipAddress;

    @ApiModelProperty("点赞数")
    private Integer dianZanNum;

    @ApiModelProperty("收藏数")
    private Integer collectNum;

}

